﻿<Window x:Class="TDAmeritrade.Client.Controls.LoginScreen"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        mc:Ignorable="d" d:DesignHeight="250" d:DesignWidth="330"
        WindowStartupLocation="CenterScreen"
        AllowsTransparency="True"
        ShowInTaskbar="False"
        Background="Transparent"
        WindowStyle="None"
        SizeToContent="WidthAndHeight"
        FocusManager.FocusedElement="{Binding ElementName=UserNameText}" FontSize="14" Title="TD Ameritrade Client Login">
    <Window.Resources>
        <Style TargetType="Label">
            <Setter Property="Margin" Value="3"/>
            <Setter Property="HorizontalAlignment" Value="Right"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
        <Style TargetType="TextBox">
            <Setter Property="Margin" Value="3,3,20,3"/>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="Width" Value="170"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="BorderThickness" Value="2"/>
            <Setter Property="Background" Value="#F0F0F0" />
        </Style>
        <Style TargetType="PasswordBox">
            <Setter Property="Margin" Value="3,3,20,3"/>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="Width" Value="170"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="BorderThickness" Value="2"/>
            <Setter Property="Background" Value="#F0F0F0" />
        </Style>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="3"/>
            <Setter Property="Padding" Value="10,2,10,2"/>
            <Setter Property="BorderThickness" Value="2"/>
        </Style>
        <DropShadowEffect x:Key="WindowShadow" Color="Black" Opacity=".25" ShadowDepth="10"/>
    </Window.Resources>
    <Border CornerRadius="0" BorderBrush="#5C5D5F" BorderThickness="4" Effect="{StaticResource WindowShadow}" Margin="10" Padding="0" MouseLeftButtonDown="Border_MouseLeftButtonDown">
        <Border.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF1C8934" Offset="0"/>
                <GradientStop Color="#FF24C147" Offset="1"/>
                <GradientStop Color="#FF2BD350" Offset="0.918"/>
                <GradientStop Color="#FF2AD651" Offset="0.322"/>
            </LinearGradientBrush>
        </Border.Background>
        <StackPanel Margin="-1,0,1,0">
            <Border Background="#5C5D5F" Padding="0,10,0,10" Margin="0,0,-1,0" Width="Auto">
                <Image Height="33" Source="/TDAmeritrade.Client;component/Resources/Logo.png" />
            </Border>
            <Grid VerticalAlignment="Top" Margin="10">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="90" Width="Auto"/>
                    <ColumnDefinition MinWidth="180" Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Label Content="Username:" Grid.Row="1" Grid.Column="0"/>
                <TextBox Name="UserName" Grid.Row="1" Grid.Column="1"/>
                <Label Content="Password:" Grid.Row="2" Grid.Column="0"/>
                <PasswordBox Name="Password" Grid.Row="2" Grid.Column="1"/>
                <StackPanel Grid.Row="3" Grid.Column="1">
                    <CheckBox Name="RememberUserName" VerticalAlignment="Center" Padding="6,-2,0,0" Margin="3" IsChecked="True" BorderThickness="2">Remember username</CheckBox>
                    <TextBlock Name="ErrorMessage" Margin="3,0,0,3" Foreground="Red">Invalid username or password</TextBlock>
                </StackPanel>
                <StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal">
                    <Button Name="LoginButton" Content="Login" FontWeight="Bold" Click="LoginButton_Click" IsDefault="True"/>
                    <Button Name="CancelButton" Content="Cancel" Click="CancelButton_Click" IsCancel="True"/>
                </StackPanel>
            </Grid>
        </StackPanel>
    </Border>
</Window>
